import 'package:flutter/widgets.dart';

import 'utils/logger.dart';

class AppNavigatorObserver extends NavigatorObserver {
  @override
  void didPop(Route route, Route? previousRoute) {
    super.didPop(route, previousRoute);
    logger.info('didPop $route');
  }

  @override
  void didPush(Route route, Route? previousRoute) {
    super.didPush(route, previousRoute);
    logger.info('didPush $route');
  }

  @override
  void didRemove(Route route, Route? previousRoute) {
    super.didRemove(route, previousRoute);
    logger.info('didRemove $route');
  }

  @override
  void didReplace({Route? newRoute, Route? oldRoute}) {
    super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
    logger.info('didReplace $newRoute');
  }

  @override
  void didStartUserGesture(Route route, Route? previousRoute) {
    super.didStartUserGesture(route, previousRoute);
    logger.info('didStartUserGesture $route');
  }

  @override
  void didStopUserGesture() {
    super.didStopUserGesture();
    logger.info('didStopUserGesture');
  }
}
